// pages/myorderbox/sendsuccess/sendsuccess.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    dataInfo: null,
    showPop: true,
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    this.setData({
      dataInfo:  JSON.parse(unescape(options.dataInfo))
    })
  },
  //继续下单
  onJiXuXiaDan: function() {
    wx.redirectTo({
      url: '../../openbillbox/selectseller/selectseller',
    })
  },
  //关闭弹窗
  popClose: function() {
    this.setData({
      showPop: false
    })
  },
  //图片预览
  previewImage: function(e) {
    var current = e.currentTarget.dataset.src;
    wx.previewImage({
      current: current[0], // 当前显示图片的http链接		  	
      urls: current // 需要预览的图片http链接列表	
    })
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function(res) {
    this.setData({
      showPop: false
    })
    if (res.from === 'button') {
      // 来自页面内转发按钮
      console.log(res.target)
    }
    return {
      title: '请核对您的订单，点击实时查询物流信息',
      imageUrl: this.data.dataInfo.order.items[0].imgSrc,
      path: "pages/myorderbox/vieworderdetail/vieworderdetail?orderId=" + this.data.dataInfo.order.id
    }
  },
  //回首页
  goHome: function() {
    wx.reLaunch({
      url: '../../about/about',
    })
  }
})